package extend.part3;


public class Main {
    public static void main(String[] args) {
        Print print = new Print();
        Teacher teacher = new Teacher();
        print.compare(teacher);
        Student student = new Student();
        print.print(student);
        print.compare(student);//报错，类型不符
    }
}
